package com.aizuda.boot.modules.business.contractNumber.service;

import com.aizuda.boot.modules.business.contractNumber.domain.entity.ContractNumberRuleEntity;
import com.aizuda.boot.modules.business.contractNumber.domain.response.ContractNumberRuleDetailVO;
import com.aizuda.boot.modules.business.contractNumber.domain.response.ContractNumberRuleListVO;
import com.aizuda.boot.modules.business.contractNumber.domain.resquest.ContractNumberRuleSaveDTO;
import com.aizuda.boot.modules.business.contractNumber.domain.resquest.GenerateNumberDTO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * @Author sangyirong
 * @ClassName ContractNumberRuleService
 * @Version 1.0
 * @Date 2025/7/2 16:23
 */
public interface ContractNumberRuleService extends IService<ContractNumberRuleEntity> {

    /**
     * 创建合同编号规则
     * @param dto
     * @return
     */
    boolean create(ContractNumberRuleSaveDTO dto);

    /**
     * 获取合同编号规则列表
     * @return
     */
    List<ContractNumberRuleListVO> getList();

    /**
     * 获取合同编号规则详情
     * @param ruleId
     * @return
     */
    ContractNumberRuleDetailVO getDetail(Long ruleId);

    /**
     * 修改合同编号规则
     * @param dto
     * @return
     */
    boolean updateRule(ContractNumberRuleSaveDTO dto);

    /**
     * 删除合同编号规则
     * @param ruleId
     * @return
     */
    boolean removeRule(Long ruleId);

    /**
     * 生成合同编号
     * @param dto
     * @return
     */
    String getContractNumber(GenerateNumberDTO dto);
}
